#include "TurnMechanics.h"

TurnMechanics::TurnMechanics(void)
{
	playerHP = 5;
	enemyHP = 3;
	menuCaseVariable = 0;
}

TurnMechanics::~TurnMechanics(void)
{
}

void TurnMechanics::menu()
{
	std::cout << "Your HP: " << playerHP << "\nThe Enemy's HP: " << enemyHP << "\n\nChoose Your Action\n\n1. Attack\n2. Magic\n3. Do Nothing\n4. Run\nSelect: ";

	std::cin >> menuCaseVariable;

	switch(menuCaseVariable)
	{
	case 1:
		std::cout << "\n\nAttacking....\n\n";
		enemyHP--;
		EnemyMove();
		break;
	case 2:
		std::cout << "\n\nUsing Magic....\n\n";
		enemyHP -= 2;
		EnemyMove();
		break;
	case 3:
		std::cout << "\n\nDo Nothing....\n\n";
		EnemyMove();
		break;
	case 4:
		std::cout << "\n\nRunning....\n\n";
		break;
	default:
		break;
	}

	if(playerHP <= 0)
	{
		std::cout << "You Have Died.\n\nGame Over\n\n";
		menuCaseVariable = 4;
	}
	if(enemyHP <= 0)
	{
		std::cout << "You have killed the enemy!!!!!!!!!!1\n\n Congrats\n\n";
		enemyHP = 3;
		menuCaseVariable = 4;
	}
}

void TurnMechanics::EnemyMove()
{
	std::cout << "Enemy Attacks You.....\n\n";
	playerHP--;
}
